<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<aside class="myCanvasNav canvi-navbar user-select" id="sidebar" th:fragment="sidebar">
    <div class="canvi-user-info">
        <div class="canvi-user-info__image" th:if="${session.user eq null}">
            <img src="img/main/pine-logo.jpg" alt="用户头像" th:src="@{/img/main/pine-logo.jpg}">
        </div>
        <div class="canvi-user-info__image" th:if="${session.user ne null}">
            <img class="img-circle tou" alt="用户头像" src="img/main/pine-logo.jpg"
                 th:src="${session.user.getUserimg() eq null?'/img/main/pine-logo.jpg':session.user.getUserimg()}">
        </div>
        <div class="canvi-user-info__data">
            <span class="canvi-user-info__title"
                  th:text="${session.user eq null?'未登录':session.user.getUsername()}">UserName</span>
            <a href="#" class="canvi-user-info__meta"
               th:text="${session.user?.getUserautograph() eq null?'这个人很懒，你细品':session.user.getUserautograph()}">UserAutograph</a>
            <div class="canvi-user-info__close"></div>
        </div>
    </div>
    <ul class="canvi-navigation" th:if="${session.user eq null}">
        <li>
            <a href="/page/toLogin" class="canvi-navigation__item">
	<span class="canvi-navigation__icon-wrapper"
          style="background: url('/img/main/login.png') no-repeat;background-size: 100% 100%">
	<span class="canvi-navigation__icon icon-iconmonstr-code-13"></span>
	</span>
                <span class="canvi-navigation__text">点此登录</span>
            </a>
        </li>
    </ul>
    <ul class="canvi-navigation" th:if="${session.user ne null}">
        <li>
            <a href="/page/about" class="canvi-navigation__item">
	<span class="canvi-navigation__icon-wrapper"
          style="background: url('/img/main/about.png') no-repeat;background-size: 100% 100%">
	<span class="canvi-navigation__icon icon-iconmonstr-code-13"></span>
	</span>
                <span class="canvi-navigation__text">个人主页</span>
            </a>
        </li>
        <li th:if="${session.user.getUserlevel()==3}">
            <a href="/page/write" class="canvi-navigation__item">
	<span class="canvi-navigation__icon-wrapper"
          style="background: url('/img/main/write.png') no-repeat;background-size: 100% 100%">
	<span class="canvi-navigation__icon icon-iconmonstr-code-13"></span>
	</span>
                <span class="canvi-navigation__text">编写帖子</span>
            </a>
        </li>
        <li>
            <a href="/page/fixpass" class="canvi-navigation__item">
	<span class="canvi-navigation__icon-wrapper"
          style="background: url('/img/main/fixpass.png') no-repeat;background-size: 100% 100%">
	<span class="canvi-navigation__icon icon-iconmonstr-code-13"></span>
	</span>
                <span class="canvi-navigation__text">修改密码</span>
            </a>
        </li>
        <li>
            <a href="/user/exit" class="canvi-navigation__item">
	<span class="canvi-navigation__icon-wrapper"
          style="background: url('/img/main/exit.png') no-repeat;background-size: 100% 100%">
	<span class="canvi-navigation__icon icon-iconmonstr-code-13"></span>
	</span>
                <span class="canvi-navigation__text">退出系统</span>
            </a>
        </li>
    </ul>
</aside>
</body>
</html>